1. Field of the Invention
This invention relates to apparatus and methods for generating trace data for debugging a software module.
2. Background of the Invention
Modern software is written in a modular fashion with each module having a specific functionality and having specific interfaces for interacting with other modules. In this manner, each module can be written and tested separately, enabling multiple developers to work in parallel on a larger software system. Modular software also advantageously allows an existing module to be incorporated into multiple larger systems. One difficulty of modular software is that each module may have a different author or be provided by a different entity having different programming conventions. It is therefore critical to test the interaction between software modules to ensure that a software system behaves as expected.
In some software systems, an existing module is adapted for use in a software system by intercepting a call to the module and executing an intermediate module that performs additional processing, which may include modifying parameters that are passed to the module. The intermediate module then invokes the module. Such a system advantageously allows for reuse of existing modules but presents difficulty for the testing and debugging of the software system. For example, it may be difficult to determine why an instruction in a software system to invoke a function of the module does not function as predicted when the identity of the intermediate module is not apparent from the source code of the module.
Debugging systems provide the ability to generate a system trace that records all function calls made by a software system or module. However, these traces include large amounts of data that is not readily interpretable to evaluate the behavior of the software system.
In view of the foregoing, it would be an advance in the art to provide an apparatus and method for selectively generating trace data in order to detect and debug interactions between separate software modules in a software system.